package com.tf.six.util;

public class RedisKeyUtil {  //Redis键生成工具类
    // 热门商品key
    public static final String HOT_PRODUCT_KEY = "hot_products";
    // 活跃用户key
    public static final String ACTIVE_USER_KEY = "active_users";
    // 商品浏览量key
    public static final String PRODUCT_VIEW_COUNT_KEY = "product_view_count:";
    // 用户交易量key
    public static final String USER_TRANSACTION_COUNT_KEY = "user_transaction_count:";

    public static String getProductViewCountKey(Long productId) {
        return PRODUCT_VIEW_COUNT_KEY + productId;
    }

    public static String getUserTransactionCountKey(Long userId) {
        return USER_TRANSACTION_COUNT_KEY + userId;
    }
}